doctype html
html.has-navbar-fixed-top lang="en"
  head
    title= title
    = csrf_meta_tags
    = csp_meta_tag

    meta charset="utf-8"/
    meta name="viewport" content="width=device-width, initial-scale=1"/
    meta http-equiv="x-ua-compatible" content="ie=edge"/
    meta name="description" content=description

    = stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track': 'reload'
    = javascript_include_tag 'application', 'data-turbolinks-track': 'reload'

    link href="/apple-touch-icon.png" rel="apple-touch-icon" sizes="180x180" /
    link href="/favicon-32x32.png" rel="icon" sizes="32x32" type="image/png" /
    link href="/favicon-16x16.png" rel="icon" sizes="16x16" type="image/png" /
    link href="/favicon.ico" rel="shortcut icon"
    link href="/manifest.json" rel="manifest" /
    link color="#dd2b2b" href="/safari-pinned-tab.svg" rel="mask-icon" /
    meta content=site_name name="apple-mobile-web-app-title" /
    meta content=site_name name="application-name" /
    meta content="#ffffff" name="theme-color" /

    meta content="website" property="og:type" /
    meta content=request.original_url property="og:url" /
    meta content=title property="og:title" /
    meta content=image_url("logo/box-with-padding.png") property="og:image" /
    meta content=description property="og:description" /
    meta content=site_name property="og:site_name" /
    meta content="en_US" property="og:locale" /

    meta content="summary" name="twitter:card" /
    meta content="@rubytoolbox" name="twitter:site" /
    meta content="@thedeadserious" name="twitter:creator" /
    meta content=request.original_url name="twitter:url" /
    meta content=title name="twitter:title" /
    meta content=description name="twitter:description" /
    meta content=image_url("logo/box-with-padding.png") name="twitter:image" /

    = auto_discovery_link_tag :rss, blog_index_url(format: :rss)

  body
    header.main
      nav.navbar aria-label="main navigation" role="navigation": .container
        .navbar-brand
          = link_to "/", title: title(default: true), class: "navbar-item" do
            = image_tag "logo/regular.svg", alt: title(default: true)

          a.navbar-item.mobile-search href=search_path
            span.icon: i.fa.fa-search

          a.navbar-burger.burger aria-expanded="false" data-target="mainMenu" aria-label="menu" role="button"
            span aria-hidden="true"
            span aria-hidden="true"
            span aria-hidden="true"

        .navbar-menu#mainMenu
          .navbar-end
            a.navbar-item.is-hidden-widescreen-only href="/" class=active_when(controller: :welcome)
              .wrap
                span.icon: i.fa.fa-home
                span Home

            a.navbar-item href=categories_path class=active_when(controller: :categories)
              .wrap
                span.icon: i.fa.fa-bars
                span Categories

            a.navbar-item href=comparison_path class=active_when(controller: :comparisons)
              .wrap
                span.icon: i.fa.fa-arrows-h
                span Compare

            a.navbar-item href=trends_path class=active_when(controller: :trends)
              .wrap
                span.icon: i.fa.fa-line-chart
                span Trends

            a.navbar-item href=page_path("docs/index") class=active_when(controller: :pages)
              .wrap
                span.icon: i.fa.fa-life-ring
                span Documentation

            a.navbar-item href=blog_index_path class=active_when(controller: :blog)
              .wrap
                span.icon: i.fa.fa-rss-square
                span News

            .navbar-item
              = render partial: "search_form"

    section.main
      = yield

    footer.footer
      .container
        .columns
          .column.navigation
            .heading Navigation
            ul
              li= link_to "Home", root_path
              li= link_to "Categories", categories_path
              li= link_to "Trends", trends_path
              li= link_to "Documentation", page_path("docs/index")
              li= link_to "News", blog_index_path
              li= link_to "Search", search_path

          .column.who
            .heading Who
            .content
              markdown:
                The Ruby Toolbox is brought to you from Hamburg since 2009 by [Christoph Olszowka](http://www.olszowka.de)

                If you want to personally say hi or complain, you can do so via mail to me at christoph (at) ruby-toolbox (dot) com

                You can also find me on Twitter as [@thedeadserious](https://twitter.com/thedeadserious)
                and on [Github](https://github.com/colszowka)

          .column.contributing
            .heading Contributing
            .content
              markdown:
                You can find the source code for this site [on github](https://github.com/rubytoolbox/rubytoolbox).

                The categorization of gems is handled via the [catalog][catalog], which you can also find [on
                Github][catalog]

                [catalog]: https://github.com/rubytoolbox/catalog

                <a href="https://github.com/rubytoolbox">
                  Contributions welcome <span class="icon has-text-danger"><i class="fa fa-heart"></i></span>!
                </a>

          .column.links
            .heading Links
            ul
              li: a href="https://github.com/rubytoolbox/rubytoolbox/blob/master/CODE_OF_CONDUCT.md"
                span.icon: i.fa.fa-users
                span Code of Conduct
              li: a href="https://gitter.im/rubytoolbox/Lobby"
                span.icon: i.fa.fa-comments
                span Community Chat Room
              li: a href=feed_url
                span.icon: i.fa.fa-rss-square
                span RSS Feed
              li: a href="https://github.com/rubytoolbox/rubytoolbox"
                span.icon: i.fa.fa-github
                span rubytoolbox/rubytoolbox
              li: a href="https://github.com/rubytoolbox/catalog"
                span.icon: i.fa.fa-github
                span rubytoolbox/catalog
              li: a href="https://data.ruby-toolbox.com"
                span.icon: i.fa.fa-table
                span Production Database Exports
              - unless Rails.env.production?
                li: a href=page_path("components")
                  span.icon: i.fa.fa-code
                  span UI Styleguide

        hr

        .columns
          .column
            h4.subtitle.is-5.has-text-centered Sponsors
        .columns.sponsors
          .column
            .heading Development funded by
            a href="https://rubytogether.org/"
              = image_tag "sponsors/rubytogether-white.svg", style: "height: 95px"
          .column
            .heading Hosted on
            a href="https://heroku.com/"
              = image_tag "sponsors/heroku.svg", style: "height: 55px; margin-top: 20px"
          .column
            .heading Monitored with
            a href="https://appsignal.com/"
              = image_tag "sponsors/appsignal-logo-horizontal.svg", style: "height: 35px; margin-top: 28px"
        .columns: .column.has-text-centered: strong.heading Thank You!


